
package com.jf.cloud.user.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import java.util.Date;

/**
 * 用户表DTO
 *
 * @author zz
 * @date 2020-12-08 11:18:04
 */
public class UserDTO{
    private static final long serialVersionUID = 1L;

    @Schema(description = "ID" )
    private Long userId;

    @Schema(description = "用户昵称" )
    @Length(min = 2, max = 12)
    private String nickName;

    @Schema(description = "M(男) or F(女)" )
    @Max(value = 1, message = "性别只能为男，女")
    @Max(value = 0, message = "性别只能为男，女")
    private String sex;

    @Schema(description = "例如：2009-11-27" )
    private String birthDate;

    @Schema(description = "头像图片路径" )
    private String pic;

    @Schema(description = "状态 1:正常 0:禁用 -1:已注销" )
    private Integer status;

    @Schema(description = "会员等级（冗余字段）" )
    private Long level;

    @Schema(description = "vip结束时间" )
    private Date vipEndTime;

    @Schema(description = "等级条件 0 普通会员 1 付费会员" )
    private Integer levelType;

    @Schema(description = "用户付费会员等级 商品个性化推荐 1:开启 0:关闭" )
    private Integer prodRecommendation;

    public Integer getProdRecommendation() {
        return prodRecommendation;
    }

    public void setProdRecommendation(Integer prodRecommendation) {
        this.prodRecommendation = prodRecommendation;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(String birthDate) {
        this.birthDate = birthDate;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getLevel() {
        return level;
    }

    public void setLevel(Long level) {
        this.level = level;
    }

    public Date getVipEndTime() {
        return vipEndTime;
    }

    public void setVipEndTime(Date vipEndTime) {
        this.vipEndTime = vipEndTime;
    }

    public Integer getLevelType() {
        return levelType;
    }

    public void setLevelType(Integer levelType) {
        this.levelType = levelType;
    }

    @Override
    public String toString() {
        return "UserDTO{" +
                "userId=" + userId +
                ", nickName='" + nickName + '\'' +
                ", sex='" + sex + '\'' +
                ", birthDate='" + birthDate + '\'' +
                ", pic='" + pic + '\'' +
                ", status=" + status +
                ", level=" + level +
                ", vipEndTime=" + vipEndTime +
                ", levelType=" + levelType +
                ", prodRecommendation=" + prodRecommendation +
                '}';
    }
}
